﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AllUsers.aspx.cs" Inherits="User_AllUsers" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<%@ Register src="ucSearchUser.ascx" tagname="ucSearchUser" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户管理</title>
    <link href="../css/f_css.css" rel="stylesheet" type="text/css" />
    <link href="../css/listpage.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="../js/jquery-1.2.6.pack.js"></script>
    <script language="javascript" src="../js/subMsg.js" type="text/javascript"></script>
    <script language="javascript" src="../js/common.js" type="text/javascript"></script>
    <script language="javascript" src="../js/qmailDataGrid.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        createQMailObj("6", "200px", "ShowUserSimple.aspx");
    </script>

    <script language="javascript" type="text/javascript">
         function preCheckItems(gvID, confimrMsg) {
            if (0 == getCheckedItemsCount(gvID))
            {
                msgWarning('没有选择记录');
                return false;
            }
            if (confimrMsg) {
                if (!confirm(confimrMsg)) {
                    return false;
                }
            }
            return true;
         }
    </script>
    <script language="javascript" type="text/javascript">
        function onRowStatusChanged(chk, rowIndex) {
            var tr = chk.parentNode.parentNode;
            if (chk.checked) {
                tr.style.backgroundColor = "#d6e2f6";
            }
            else {
                tr.style.backgroundColor = "";
            }
        }
    </script>
    <script language="javascript" type="text/javascript">
        function editTask(id) {
            var url = "Task/EditTaskDlg.aspx?id=" + id.toString();
            window.parent.document.openDialog(url, "编辑任务", editTaskCallback, 600, 340);
        }
        function editTaskCallback(type, key, value) {
            if (type == 1) {
            }
        }
    </script>
    <style type="text/css">
    #gv th
    {
        border:none;
    }
    #gv td
    {
        border-top:none;
        border-left:none;
        border-right:none;
        border-bottom:solid 1px #EEEEEE;
    }
    .right
    {
        float: right;
    }
    #divSearch{border:2px solid #fcc400; height:auto; min-height:60px; padding:3px; display:none;}
    .searchCtrl{width:80px; float:left;}
    .schItem{width:230px; float:left; height:22px; line-height:22px;}
    
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="titleText">
        用户管理 <span style="font-size: 12px; font-weight: normal;">(总记录
        <asp:Label runat="server" ID="lblTotal" Text="0"></asp:Label>)
        <asp:Label runat="server" ID="lblFiltered"></asp:Label>
        </span>
    </div>
    <div class="btdiv2">
            <asp:Button ID="btnRefresh" runat="server" CssClass="input00" Text="刷新" 
                onclick="btnRefresh_Click" />
            <input type="button" onclick="javascript:toggleVisibleByID('divSearch');" class="input00" value="查找任务" />
            <asp:Button ID="btnDelete" runat="server" CssClass="input00" Text="删除"
                OnClientClick="javascript:if(!preCheckItems('gv', '确认删除选中的用户？')) return false;"
                onclick="btnDelete_Click" />
        <div class="right">
            <webdiyer:AspNetPager ID="pager" CssClass="pager" runat="server" CustomInfoHTML="%CurrentPageIndex%/%PageCount%页&nbsp;&nbsp;"
                CustomInfoSectionWidth="12%" CustomInfoTextAlign="Right" 
                FirstPageText="首页" LastPageText="末页"
                LayoutType="Table" NextPageText="下一页" NumericButtonCount="6" NumericButtonTextFormatString="[{0}]"
                PageSize="20" PagingButtonSpacing="2px" PrevPageText="上一页" ShowCustomInfoSection="Left"
                SubmitButtonText="转到" onpagechanged="pager_PageChanged">
            </webdiyer:AspNetPager>
        </div>
    </div>
    <div id="divSearch">
        
        <uc1:ucSearchUser ID="ucSearch" runat="server" OnFilterChanged="ucSearch_OnFilterChanged" />
        
    </div>
    <div style="clear:both;"></div>
    <div class="tableContaner">
        <asp:GridView ID="gv" runat="server" CssClass="table2" AutoGenerateColumns="False">
            <Columns>
                <asp:TemplateField HeaderStyle-Width="20px" ItemStyle-HorizontalAlign="Center">
                    <HeaderTemplate>
                        <input type="checkbox" onclick="javascript:checkAll(this);" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox runat="server" ID="chk" onclick='<%# "javascript:onRowStatusChanged(this, " + Container.DataItemIndex + ");"%>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="姓名" DataField="Name" />
                <asp:BoundField HeaderText="登录名" DataField="LoginName" />
                <asp:BoundField HeaderText="工作证号" DataField="WorkNumber" />
                <asp:TemplateField HeaderText="创建日期">
                    <ItemTemplate><%# FormatDateTime(Eval("CreateDateTime"), false)%></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作" ItemStyle-Width="100px">
                    <ItemTemplate>
                        <a href="javascript:void(0);" onclick='javascript:showDetail(this,<%# Eval("AID") %>);' title="查看详细信息">详细</a>
                        <a href='AddUser.aspx?op=edit&id=<%# Eval("AID") %>' title="编辑任务信息">编辑</a>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="listhead" />
            <AlternatingRowStyle CssClass="alt" />
        </asp:GridView>
    </div>
        <div class="btdiv2">
            &nbsp;<anthem:Button ID="Button3" runat="server" CssClass="input00" Text="刷新" />
            &nbsp;<anthem:Button ID="Button4" runat="server" CssClass="input00" Text="删除" />
        <div class="right">
            <webdiyer:AspNetPager ID="pager2" runat="server" CssClass="pager" CustomInfoHTML="%CurrentPageIndex%/%PageCount%页&nbsp;&nbsp;"
                CustomInfoSectionWidth="12%" CustomInfoTextAlign="Right" 
                FirstPageText="首页" LastPageText="末页"
                LayoutType="Table" NextPageText="下一页" NumericButtonCount="6" NumericButtonTextFormatString="[{0}]"
                PageSize="20" PagingButtonSpacing="2px" PrevPageText="上一页" ShowCustomInfoSection="Left"
                SubmitButtonText="转到" onpagechanged="pager2_PageChanged">
            </webdiyer:AspNetPager>
        </div>
    </div>
    </form>
</body>
</html>
